var cc__decorate = __decorate;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.UITtext = undefined;
var $2Tip = require("Tip");
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var exp_UITtext = /* */function (_cc$Component30) {
  function _ctor() {
    var _this133;
    babel_classCallCheck(this, _ctor);
    _this133 = _callSuper(this, _ctor, arguments);
    _this133.tipPrefab = null;
    _this133.tipPool = [];
    return _this133;
  }
  babel_inherits(_ctor, _cc$Component30);
  return babel_createClass(_ctor, [{
    key: "showTip",
    value: function showTip(e) {
      var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : cc.color(255, 255, 255);
      for (var _i33 = 0; _i33 < this.tipPool.length; ++_i33) {
        if (null != this.tipPool[_i33] && this.tipPool[_i33].isReady()) {
          return void this.tipPool[_i33].playTip(e, t);
        }
      }
      var n = cc.instantiate(this.tipPrefab);
      n.parent = this.node.getChildByName("content");
      var o = n.getComponent($2Tip.Tip);
      this.tipPool.push(o);
      o.playTip(e, t);
    }
  }]);
}(cc.Component);
exp_UITtext.className = "UITtext";
cc__decorate([ccp_property(cc.Prefab)], exp_UITtext.prototype, "tipPrefab", undefined);
exp_UITtext = cc__decorate([ccp_ccclass], exp_UITtext);
exports.UITtext = exp_UITtext;